# $Id: PKGBUILD 175937 2013-01-25 05:25:09Z eric $
# Maintainer: damir <damir@archlinux.org>
# Maintainer/Contributor: Francois Charette <firmicus@gmx.net>

pkgname=perl-xml-twig
_realname=XML-Twig
pkgver=3.42
pkgrel=1
pkgdesc="A module for easy processing of XML"
arch=('any')
url="http://search.cpan.org/dist/${_realname}/"
license=('GPL' 'PerlArtistic')
depends=('perl-xml-parser' 'perl-text-iconv' 'perl')
checkdepends=('perl-libwww' 'perl-test-pod' 'perl-xml-simple' 'perl-html-tree')
options=('!emptydirs')
source=("http://www.cpan.org/authors/id/M/MI/MIROD/${_realname}-${pkgver}.tar.gz")
sha1sums=('ec1577a3f8a89f7229f05e2a87bfb753d08f9af6')

build() {
  cd "${srcdir}/${_realname}-${pkgver}"
  perl Makefile.PL -y INSTALLDIRS=vendor
  make
}

check() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make test
}

package() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
}
